//
//  HNOrderConsultCell.m
//  baidaifu
//
//  Created by 朱传正 on 2017/1/19.
//  Copyright © 2017年 haoniu. All rights reserved.
//

#import "HNOrderConsultCell.h"

@implementation HNOrderConsultCell

-(void)changeNameSize:(NSString *)nameStr andState:(BOOL)isColor{
    CGFloat width = nameStr.length * 12 + 10;
    CGRect frame = _cellName.frame;
    frame.size.width = width;
    _cellName.frame = frame;
    if (isColor) {
        _cellName.backgroundColor = RGB(140, 217, 138);
    }
    
}

-(void)changeState:(NSInteger)state{
    if (state == 0) {
        [self.cellState setText:@"待付款"];
        [self.cellState setTextColor:RGB(252, 102, 104)];
    }else if(state == 1){
        [self.cellState setText:@"已付款"];
         [self.cellState setTextColor:RGB(243, 150, 60)];
    }else if(state == 11){
         [self.cellState setText:@"服务中"];
         [self.cellState setTextColor:RGB(54, 203, 52)];
    }else if(state == 3){
        [self.cellState setText:@"已完成"];
         [self.cellState setTextColor:RGB(41, 181, 243)];
    }else if(state == 32){
        [self.cellState setText:@"已退款"];
        [self.cellState setTextColor:RGBJ(240)];
    }
}



- (void)awakeFromNib {
    [super awakeFromNib];
    _topLabelView.backgroundColor = RGB(236, 240, 241);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
